package com.hy;

import com.hy.jedis.properties.JedisProperties;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.context.annotation.Bean;

/**
 * Created With IntelliJ IDEA.
 * Descriptions:
 * User:Mr.Du
 * Date:2023/7/21
 * Time:16:45
 */
@ConfigurationPropertiesScan
@SpringBootApplication
@RequiredArgsConstructor
@Slf4j
public class TestRedisApplication {

    private final JedisProperties jedisProperties;


    public static void main(String[] args) {
        SpringApplication.run(TestRedisApplication.class, args);
        System.out.println("End=================");
    }

    @Bean
    public CommandLineRunner commandLineRunner() {
        return (args) -> {
            log.info("jedisProperties properties: {}", jedisProperties.getHost());
        };
    }
}
